{
  "properties" : { },
  "id" : "b00635ac5be64689a8f275f70a0eadca",
  "script" : null,
  "groupId" : "b6112dd1a5fc4f9f98d1a3435a834c9b",
  "name" : "添加",
  "createTime" : null,
  "updateTime" : 1741072543346,
  "lock" : null,
  "createBy" : "管理员",
  "updateBy" : "可辉",
  "path" : "add",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ {
    "name" : "permission",
    "value" : "system:jsgl",
    "description" : "允许拥有该权限的访问",
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "requestBody" : "{\"roleName\":\"工作流管理员\",\"roleCode\":\"ACTIVITI_USER\",\"sort\":99,\"status\":0}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": 0\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import com.gitee.fastmybatis.core.query.Query;

import 'com.wiwf.model.mapper.admin.dao.SysRoleMapper' as sysRoleMapper;

    if(body.roleId != null){
        return sysRoleMapper.update(body);
    }

return sysRoleMapper.save(body);